﻿using System;
using System.Collections.Generic;
using Autodesk.Revit.DB;
using TopologySearch;

namespace FrontRoomCheck.Utiltiy
{
	public static class CurveLoopOper
	{
		public static List<List<Curve>> GetBoundaryCurves(Document doc, List<Curve> curves)
		{
			int num = 0;
			List<Pole2D> list = new List<Pole2D>();
			foreach (Curve curve in curves)
			{
				Pole2D item = Pole2D.TransformWallToStructure2DPole(curve, new ElementId(num++), 0.0, 0.0);
				list.Add(item);
			}
			StructureLoopSearcher structureLoopSearcher = new StructureLoopSearcher(doc);
			return structureLoopSearcher.GetCellsEdgeLoops(list, true);
		}
	}
}
